We propose a new scheme to extract “optimal” interatomic potentials starting from a large number of atomic configurations (and their forces) obtained from first-principles calculations. The method appears to be able to overcome the difficulties encountered by traditional fitting approaches when using rich and complex analytical forms, and constitute a step forward towards large-scale simulations of condensed matter systems with a degree of accuracy comparable to that obtained by ab initio methods. A first exploratory application to aluminum is presented.